from mutiApp import run_process
import json
import requests
import sys
from util import get_camera_list
# if __name__ == '__main__':
#     import os
#     import shutil
#     from PIL import Image
#     import math
#     # 假设图片所在的文件夹路径
#     image_folder = r"G:\project\ketang_data\class_qian\images\train"
#
#     # 目标文件夹路径
#     destination_folder = "path/to/destination/folder"
#     # 假设姓名列表
#     names = ["阳先鸿", "杜洋", "冉明武", "李海梁", "周明月", "李宏刚", "王成源", "谭继超", "陈峥岩"]
#
#     # 创建目标文件夹
#     for name in names:
#         os.makedirs(os.path.join(destination_folder, name), exist_ok=True)
#
#     # 统计每个姓名对应的图片数量
#     name_image_counts = {name: 0 for name in names}
#
#     # 遍历图片文件夹，统计每个姓名对应的图片数量
#     for filename in os.listdir(image_folder):
#         if filename.endswith(('.jpg', '.jpeg', '.png', '.gif')):
#             for name in names:
#                 if name in filename:
#                     name_image_counts[name] += 1
#                     break
#
#     # 计算平均每个姓名应该分配的图片数量
#     total_images = sum(name_image_counts.values())
#     average_images_per_name = math.ceil(total_images / len(names))
#
#     # 遍历图片文件夹，将图片均匀分配到每个文件夹中
#     for filename in os.listdir(image_folder):
#         if filename.endswith(('.jpg', '.jpeg', '.png', '.gif')):
#             for name in names:
#                 if name in filename:
#                     src_path = os.path.join(image_folder, filename)
#                     dst_path = os.path.join(destination_folder, name, filename)
#                     shutil.move(src_path, dst_path)
#                     name_image_counts[name] -= 1
#                     if name_image_counts[name] == 0:
#                         break  # 当某个姓名的图片数量达到平均值时，停止分配图片到该姓名对应的文件夹中
#
#     print("Images have been evenly distributed into folders based on names.")


if __name__ == '__main__':
    aa= [{'fight': [], 'fall': [], 'fire': [], 'gather': []} for j in range(5)]
    aa[0]["fight"].append(1)
    print(aa[0])

